//
//  FavouriteEmotion.swift
//  Tinsecret_TW
//
//  Created by wanghui on 2019/2/19.
//  Copyright © 2019年 tst. All rights reserved.
//

import UIKit
import WCDBSwift

class FavouriteEmotion: TableCodable {
    static let table = "FavouriteEmotion"
    var id:Int64 = 0
    var name:String? = nil
    var url:String? = nil
    var thumbnailUrl:String? = nil
    var groupID:Int64 = 0
   
    enum CodingKeys: String, CodingTableKey {
        typealias Root = FavouriteEmotion
        static let objectRelationalMapping = TableBinding(CodingKeys.self)
        case id
        case name
        case url
        case thumbnailUrl = "thumbnail_url"
        case groupID = "group_id"
        
        //        static var columnConstraintBindings: [CodingKeys: ColumnConstraintBinding]? {
        //            return [.id: ColumnConstraintBinding(isPrimary: true, isAutoIncrement: true)]
        //        }
        
        //        static var indexBindings: [IndexBinding.Subfix: IndexBinding]? {
        //            return [
        //                "_userIdIndex": IndexBinding(indexesBy: userId)
        //            ]
        //        }
        
    }
    
    //    var isAutoIncrement: Bool = true
    var lastInsertedRowID: Int64 = 0
    
    
}
